/**
 * 列表搜索项：输入框
 */
import React from 'react';
import { Input } from 'antd';

const SearchInput = {
  transData: (values, name) => values[name],
  render: (item, onChange) => (
    <Input
      placeholder="请输入"
      name={item.field}
      key={item.field}
      className="search-form-item"
      onChange={(e) => onChange({ [item.field]: e.target.value }, item.field)}
      // value={item.value}
      maxLength={item.maxLength || 64}
    />
  ),
};

export default SearchInput;
